import { I18n } from './I18n';

const _isMPayBroswer = () => {
  // #ifdef H5
  return navigator.userAgent.toLowerCase().includes('mpay');
  // #endif
  // #ifndef H5
  return false;
  // #endif
};

const systemLanguage = _isMPayBroswer()
  ? 'zh-hk'
  : uni.getSystemInfoSync().language || '';
const language = I18n.getLanguageType(systemLanguage);
const i18n = new I18n(language);
export default i18n;
